﻿<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <title>权限管理</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <link rel="stylesheet" href="resources/scripts/assets/bootstrap/css/icheck-bootstrap.css">
    <!--bootStrop css 主样式-->
    <link rel="stylesheet" href="resources/scripts/assets/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="resources/scripts/assets/bootstrap/css/bootstrap-select.css">
    <!--loading样式-->
    <link rel="stylesheet" href="files/用户管理/loading.css">
    <!--jquery js-->
    <script src="resources/scripts/assets/js/jquery-2.2.3.min.js"></script>
    <!--bootStrop js-->
    <script src="resources/scripts/assets/bootstrap/js/bootstrap.min.js"></script>
    <script src="resources/scripts/assets/bootstrap/js/bootstrap-select.min.js"></script>
    <!--angular js-->
    <script src="resources/scripts/angular/angular.min.js"></script>
    <!--自定义js-->
    <script src="files/权限管理_1/data.js"></script>
</head>
<body ng-app="quanXian1" ng-controller="quanXian1View" id="quanXian1View">
<div id="title"></div>

<div class="text-center">
    <span style="color: #0a6cd6">
        <h4><strong>管理科室权限(医务处)</strong></h4>
    </span>
</div>
<h6 class="page-header"></h6>
<div class="col-lg-12">
    <span class="pull-right" id="div"></span>
</div>
<br/><br/>
<div style="width: 95%;background:rgba(149,151,157,0.14);text-align: center;margin:auto;height: 145px">
    <br/>
    <form class="form-inline">
        <div class="form-group col-lg-6">
            <label>科室名称:</label>
            <select class="form-control" id="keshi">
                <option>请选择</option>
            </select>
            <br/><br/>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <input type="button" class="btn btn-info " value="新增" data-toggle="modal" data-target="#myModal2">
        </div>
        <div class="form-group col-lg-6">
            <label>人员名称:</label>
            <input class="form-control" type="text" id="name">
            <br/><br/>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <input type="button" class="btn btn-info" value="检索" ng-click="retrieval()">
        </div>
    </form>
    <br/>
</div>
<br/>
<div class="spinner" style="padding-right: 0px;text-align: right;">
    <br/>
    <div class="spinner-container container1">
        <div class="circle1"></div>
        <div class="circle2"></div>
        <div class="circle3"></div>
        <div class="circle4"></div>
    </div>
    <div class="spinner-container container2">
        <div class="circle1"></div>
        <div class="circle2"></div>
        <div class="circle3"></div>
        <div class="circle4"></div>
    </div>
    <div class="spinner-container container3">
        <div class="circle1"></div>
        <div class="circle2"></div>
        <div class="circle3"></div>
        <div class="circle4"></div>
    </div>
</div>
<br/><br/><br/>
<table class="table table-hover table-bordered" style="width: 95%;text-align: center;margin:auto">
    <tr style="background-color: #57bfda;color: #ecf0f1">
        <td>序号</td>
        <td>科室</td>
        <td>人员</td>
        <td style="width: 20%">操作</td>
    </tr>
    <tr class="data" ng-repeat="data in datas">
        <td>
            {{data.id}}
        </td>
        <td>
            <span ng-repeat="department in data.responsibleDepartment">{{department.responsibleDepartment}}&emsp;</span>
        </td>
        <td>
            {{data.name}}
        </td>
        <td>
            <input type="button" class="btn btn-info" value="编辑" ng-click="edit(data.id)">
            <input type="button" class="btn btn-info" value="删除" ng-click="delete(data.id)">
        </td>
    </tr>
</table>
<br/>
<div class="">
    <div class="pull-left">
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第{{page.page}}页/共{{page.remaining_pages}}页&nbsp;&nbsp;&nbsp;&nbsp;总共{{page.count}}条数据
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <span id="column"></span>
    </div>
    <div class="col-md-offset-9 col-lg-offset-8 col-xs-offset-8 col-sm-offset-8">
        <!--所有数据分页-->
        <a href style="text-decoration: none" ng-click="page1('-1')" id="shangye">
            <div class="glyphicon glyphicon-step-backward"></div>
            上一页
        </a>
        <!--模糊查询分页-->
        <a href style="text-decoration: none;display: none" ng-click="page2('-1')" id="shangyes">
            <div class="glyphicon glyphicon-step-backward"></div>
            上一页
        </a>
        &nbsp;&nbsp;&nbsp;
        <!--所有数据分页-->
        <a href style="text-decoration: none" ng-click="page1('+1')" id="xiaye">
            下一页
            <div class="glyphicon glyphicon-step-forward"></div>
        </a>
        <!--模糊查询分页-->
        <a href style="text-decoration: none;display: none" ng-click="page2('+1')" id="xiayes">
            下一页
            <div class="glyphicon glyphicon-step-forward"></div>
        </a>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <!--所有数据分页-->
        <a href style="text-decoration: none" ng-click="page1()" id="weiye">
            尾页
            <div class="glyphicon glyphicon-forward"></div>
        </a>
        <!--模糊查询分页-->
        <a href style="text-decoration: none;display: none" ng-click="page2()" id="weiyes">
            尾页
            <div class="glyphicon glyphicon-forward"></div>
        </a>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        跳转到&nbsp;<input type="number" min="1" id="JumpPage" style="width: 10%"/>页
        &nbsp;&nbsp;
        <!--所有数据分页-->
        <input type="button" class="btn btn-info" style="width:12%;height:3%" value="跳转" ng-click="page1('jump')"
               id="tiaozhuanye">
        <!--模糊查询分页-->
        <input type="button" class="btn btn-info" style="width:12%;height:3%;display: none" value="跳转"
               ng-click="page2('jump')"
               id="tiaozhuanyes">
    </div>
</div>
<!--编辑框-->
<div class="modal fade bs-example-modal-lg2" id="myModal" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title">编辑</h4>
            </div>
            <div class="modal-body" id="modal-body">
                <div id="divs" class="pull-right"></div>
                <br/><br/>
                <div class="form-inline" ng-style="myStyle">
                    <div class="col-lg-4">
                        <input type="hidden" id="id">
                        用户姓名:<input type="text" class="form-control" ng-model="data.name"
                                    value="data.name" disabled>
                    </div>
                    <div class="col-lg-4">
                        电话:<input type="tel" class="form-control" ng-model="data.phone"
                                  value="data.phone" disabled>
                    </div>
                    <div class="col-lg-4">
                        邮箱:<input type="email" class="form-control" ng-model="data.email"
                                  value="data.email" disabled>
                    </div>
                    <br/><br/><br/><br/>
                    <div class="col-lg-4">
                        &emsp;&nbsp;&nbsp;
                        性别:
                        <select class="selects form-control" disabled id="sex">
                            <option>请选择</option>
                            <option class="sexs" value="男">男</option>
                            <option class="sexs" value="女">女</option>
                        </select>
                    </div>
                    <div class="col-lg-4">
                        科室:
                        <select id="keshis" name="keshi" class="selectpicker" title="请选择" multiple>
                        </select>
                    </div>
                    <div class="col-lg-4">
                        角色:
                        <select id="role" name="role" class="selectpickers" title="请选择" multiple>
                        </select>
                    </div>
                    <br/><br/><br/><br/><br/>
                </div>
            </div>
            <div class="modal-footer">
                <button type='button' class='btn btn-info' ng-click="update()">修改</button>
                <button type='button' class='btn btn-default' data-dismiss='modal'>取消</button>
            </div>
        </div>
    </div>
</div>
<!--新增框-->
<div class="modal fade bs-example-modal-lg" id="myModal2" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title">编辑</h4>
            </div>
            <div class="modal-body">
                <div id="div2" class="pull-right"></div>
                <br/><br/>
                <div class="form-inline">
                    <div class="col-lg-4">
                        &emsp;&emsp;科室:<input type="text" class="form-control" id="departments">
                    </div>
                    <div class="col-lg-4">
                        &emsp;&emsp;角色:<input type="text" class="form-control" id="roles">
                    </div>
                    <div class="col-lg-4">
                        &emsp;&emsp;角色级别:
                        <select class="form-control">
                            <option>请选择</option>
                            <option class="role" value="一级">一级</option>
                            <option class="role" value="二级">二级</option>
                            <option class="role" value="三级">三级</option>
                        </select>
                    </div>
                    <br/><br/><br/>
                    <div class="col-lg-4">
                        操作范围:<input type="text" class="form-control" id="range">
                    </div>
                    <br/><br/><br/>
                </div>
            </div>
            <div class="modal-footer">
                <button type='button' class='btn btn-info' ng-click="Insert()">添加</button>
                <button type='button' class='btn btn-default' data-dismiss='modal'>取消</button>
            </div>
        </div>
    </div>
</div>
</body>
</html>
